﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace BusinessLogic.BusinessRules
{
    public class SessionUser
    {
        //Session 存储对象
        private string _strLoginName;
        private int _intUserId;
        private DateTime _dtmLastAccessTime;
        private string _strPsw;
        private string _strName;
        private string _strPermissions;
        private string _strPermissionsText;
        private string _rootPath;
        private string _vartualPath;
        private string _strPicPath;
        private string _strIssuePath;
        private string _strWebUrl;
        private string _strMiniPicPath;
        private string _strTemplatePath;
        private int _intWebSiteId;
        private int _intManagerCompetence;
        //private Hashtable _codeHash=new Hashtable( );
        //private Hashtable _systemHash = new Hashtable();
        //private Hashtable _browserHash = new Hashtable();
        //private Hashtable _tabsHash = new Hashtable();
        //private Hashtable _sessionHash = new Hashtable();
        //private Hashtable _dbugHash = new Hashtable();
        private Hashtable _treeHash = new Hashtable();
        //private Hashtable _mainHash = new Hashtable();
        //private Hashtable _getHash = new Hashtable();
        //private Hashtable _trimHash = new Hashtable();
        //private Hashtable _checkHash = new Hashtable();
        
        //是否启用父路径
        private bool _intEnableParentPath;

        public bool EnableParentPath
        {
            get { return _intEnableParentPath; }
            set { _intEnableParentPath = value; }
        }

        //启用父路径情况下 栏目后面是否带有板块ID
        private bool _intEnableSectionID;

        public bool EnableSectionID
        {
            get { return _intEnableSectionID; }
            set { _intEnableSectionID = value; }
        }

        //启用短路径
        private bool _intEnableShortPath;

        public bool EnableShortPath
        {
            get { return _intEnableShortPath; }
            set { _intEnableShortPath = value; }
        }

        //网站等级
        private int _intWebSiteLevel;

        public int WebSiteLevel
        {
            get { return _intWebSiteLevel; }
            set { _intWebSiteLevel = value; }
        }


        public string Rootpath
        {
            get
            {
                if (_rootPath == string.Empty)
                    throw new Exception("登陆已过期");
                return _rootPath;
            }
            set { _rootPath = value; }
        }
        public string VartualPath
        {
            get
            {
                if (_vartualPath == string.Empty)
                    throw new Exception("登陆已过期");
                return _vartualPath;
            }
            set { _vartualPath = value; }
        }
        public string PicPath
        {
            get
            {
                if (_strIssuePath == string.Empty)
                    throw new Exception("登陆已过期");
                return _strPicPath;
            }
            set { _strPicPath = value; }
        }
        public string IssuePath
        {
            get { return _strIssuePath; }
            set { _strIssuePath = value; }
        }
        public string WebUrl
        {
            get { return _strWebUrl; }
            set { _strWebUrl = value; }
        }
        public string MiniPicPath
        {
            get { return _strMiniPicPath; }
            set { _strMiniPicPath = value; }
        }
        public string TemplatePath
        {
            get { return _strTemplatePath; }
            set { _strTemplatePath = value; }
        }
        public int WebSiteID
        {
            get { return _intWebSiteId; }
            set { _intWebSiteId = value; }
        }
        public int ManagerCompetence
        {
            get { return _intManagerCompetence; }
            set { _intManagerCompetence = value; }
        }

        public SessionUser()
        {
            _strLoginName = string.Empty;
            _intUserId = 0;
            _strPsw = string.Empty;
            _strName = string.Empty;
        }
        public string LoginName
        {
            get { return _strLoginName; }
            set { _strLoginName = value; }
        }
        public string Permissions
        {
            get { return _strPermissions; }
            set { _strPermissions = value; }
        }
        public string PermissionsText
        {
            get { return _strPermissionsText; }
            set { _strPermissionsText = value; }
        }
        public int UserID
        {
            get { return _intUserId; }
            set { _intUserId = value; }
        }
        public DateTime DtmLastAccessTime
        {
            get { return _dtmLastAccessTime; }
            set { _dtmLastAccessTime = value; }
        }
        public string Psw
        {
            get { return _strPsw; }
            set { _strPsw = value; }
        }
        public string StrName
        {
            get { return _strName; }
            set { _strName = value; }
        }
        //public Hashtable CodeHash
        //{
        //    get { return _codeHash; }
        //    set { _codeHash = value; }
        //}
        //public Hashtable SystemHash
        //{
        //    get { return _systemHash; }
        //    set { _systemHash = value; }
        //}
        //public Hashtable BrowserHash
        //{
        //    get { return _browserHash; }
        //    set { _browserHash = value; }
        //}
        //public Hashtable TabsHash
        //{
        //    get { return _tabsHash; }
        //    set { _tabsHash = value; }
        //}
        //public Hashtable SessionHash
        //{
        //    get { return _sessionHash; }
        //    set { _sessionHash = value; }
        //}
        //public Hashtable DbugHash
        //{
        //    get { return _dbugHash; }
        //    set { _dbugHash = value; }
        //}
        public Hashtable TreeHash
        {
            get { return _treeHash; }
            set { _treeHash = value; }
        }
        //public Hashtable MainHash
        //{
        //    get { return _mainHash; }
        //    set { _mainHash = value; }
        //}
        //public Hashtable GetHash
        //{
        //    get { return _getHash; }
        //    set { _getHash = value; }
        //}
        //public Hashtable TrimHash
        //{
        //    get { return _trimHash; }
        //    set { _trimHash = value; }
        //}
        //public Hashtable CheckHash
        //{
        //    get { return _checkHash; }
        //    set { _checkHash = value; }
        //}
    }
}
